package ru.usu.gv.uicomponents;

import javax.media.j3d.Material;
import javax.vecmath.Color3f;

/**
 @author Sergey Pupyrev 
 Apr 2, 2006
 */

public class UIConstants
{
    //edge
    public static final double defaultEdgeLength = 0.9d;
    public static final double defaultEdgeRadius = 0.005d;
    public static final Material defaulEdgeMaterial;

    //vertex
    private static final double defaultVertexRadius = 0.05d;
    public static final Material defaulVertexMaterial;

    public static final Material highlightMaterial;

    public static final Color3f RED = new Color3f(1.0f, 0f, 0f);
    public static final Color3f GREEN = new Color3f(0.3f, 0.8f, 0.3f);

    static
    {
        Color3f yellow = new Color3f(255f / 255f, 255f / 255f, 0f);
        Color3f ambientYellow = new Color3f(255f / 510f, 255f / 510f, 0f);

        Color3f eColor = new Color3f(0.8f, 0.9f, 0.0f);
        Color3f sColor = new Color3f(0.3f, 0.3f, 0.0f);
        highlightMaterial = new Material(ambientYellow, eColor, yellow, sColor, 10.0f);
        highlightMaterial.setLightingEnable(true);
        highlightMaterial.setCapability(Material.ALLOW_COMPONENT_WRITE);

        //		public static Color3f blue = new Color3f(0.0f, 0.0f, 1.0f);
        //	public static Color3f ambientBlue = new Color3f(0.0f, 0.0f, 0.4f);

        Color3f aColor = new Color3f(0.0f, 0.0f, 0.4f);
        eColor = new Color3f(0.0f, 0.0f, 0.0f);
        Color3f dColor = new Color3f(0.0f, 0.0f, 1.0f);
        sColor = new Color3f(1.0f, 1.0f, 1.0f);
        defaulVertexMaterial = new Material(aColor, eColor, dColor, sColor, 100.0f);
        defaulVertexMaterial.setLightingEnable(true);
        defaulVertexMaterial.setCapability(Material.ALLOW_COMPONENT_WRITE);

        //doesn't work!!!
        Color3f col = new Color3f(0.2f, 0.65f, 0.6f);
        defaulEdgeMaterial = new Material(col, col, col, col, 10.0f);
        //ColoringAttributes ca = new ColoringAttributes(col, ColoringAttributes.NICEST);
        //appearance.setColoringAttributes(ca);

    }
}
